package com.zhaotianhao.serviceproduct.controller;


import com.zhaotianhao.serviceproduct.dto.CartDto;
import com.zhaotianhao.serviceproduct.service.ISkuService;
import com.zhaotianhao.serviceproduct.vo.SkuVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 * sku表,该表表示具体的商品实体,如黑色的 64g的iphone 8 前端控制器
 * </p>
 *
 * @author Z-7
 * @since 2022-04-27
 */
@RestController
@RequestMapping("/sku")
public class SkuController {
    @Autowired
    private ISkuService iSkuService;

    @PostMapping("getCartSkuInfoByIds")
    public List<SkuVo> getCartSkuInfoByIds(@RequestBody CartDto cartDto) {
        List<SkuVo> skuVos = iSkuService.getCartSkuInfoByIds(cartDto.getSkuIds());
        return skuVos;
    }
}
